package com.bci.pwtz.mysql.model;

import java.util.Date;

import com.bci.pwtz.common.PwtzConstants;

public class Company {
    private Long companyId;

    private String companyName;

    private Long pId;

    private Integer status;

    private Date createTime;

    private String remark;

    private String tel;

    private String contactPerson;

    private String provinceCode;

    private String cityCode;

    private String areaCode;

    private String address;

    private Long creatorId;
    
    private Integer refStatus=0;
    
    private String parentCompanyName;
    
    private Integer vip;
    
    private Date invalidTime;
    
    private Integer number;

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel == null ? null : tel.trim();
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson == null ? null : contactPerson.trim();
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode == null ? null : provinceCode.trim();
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode == null ? null : cityCode.trim();
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode == null ? null : areaCode.trim();
    }

    /**
     * @return the parentCompanyName
     */
    public String getParentCompanyName()
    {
        return parentCompanyName;
    }

    /**
     * @param parentCompanyName the parentCompanyName to set
     */
    public void setParentCompanyName(String parentCompanyName)
    {
        this.parentCompanyName = parentCompanyName;
    }

    public String getAddress() {
        String provinceStr=PwtzConstants.PROVINCE_MAP.get(provinceCode) ==null?"":PwtzConstants.PROVINCE_MAP.get(provinceCode);
        String cityStr=PwtzConstants.CITY_MAP.get(cityCode) ==null?"":PwtzConstants.CITY_MAP.get(cityCode);
        String areaStr=PwtzConstants.COUNTRY_MAP.get(areaCode)==null?"":PwtzConstants.COUNTRY_MAP.get(areaCode);
        String str= provinceStr+cityStr+areaStr;
        return str;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    @Override
    public String toString()
    {
        return "Company [companyId=" + companyId + ", companyName=" + companyName + ", pId=" + pId + ", status=" + status + ", createTime=" + createTime + ", remark=" + remark + ", tel=" + tel + ", contactPerson=" + contactPerson + ", provinceCode=" + provinceCode + ", cityCode=" + cityCode + ", areaCode=" + areaCode + ", address=" + address + ", creatorId=" + creatorId + "]";
    }

    public Integer getRefStatus()
    {
        return refStatus;
    }

    public void setRefStatus(Integer refStatus)
    {
        this.refStatus = refStatus;
    }

	public Integer getVip() {
		return vip;
	}

	public void setVip(Integer vip) {
		this.vip = vip;
	}

	public Date getInvalidTime() {
		return invalidTime;
	}

	public void setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
	}

    /**
     * @return the number
     */
    public Integer getNumber()
    {
        return number;
    }

    /**
     * @param number the number to set
     */
    public void setNumber(Integer number)
    {
        this.number = number;
    }
    
}